package com.demo1221.listener;

import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
//@WebListener("/demo1221/MyHttpSessionLister.do")
public class SessionListerner implements HttpSessionListener {
    @Override
    public void sessionCreated(HttpSessionEvent se) {
//        HttpSession session=(HttpSession)se;
//        ((HttpSession) se).setMaxInactiveInterval(30);
        System.out.println("HttpSession 被创建");

    }

    @Override
    public void sessionDestroyed(HttpSessionEvent se) {
        System.out.println("HttpSession 被销毁");
    }
}
